package net.lesscoding.shop.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 
 * @TableName trade_user_money_log
 */
@TableName(value ="trade_user_money_log")
@Data
public class UserMoneyLog implements Serializable {
    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 订单ID
     */
    private Long orderId;

    /**
     * 日志类型 1订单付款 2 订单退款
     */
    private Integer moneyLogType;

    /**
     * 
     */
    private BigDecimal useMoney;

    /**
     * 日志时间
     */
    private LocalDateTime createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public UserMoneyLog(Long orderId,Long userId,  Integer moneyLogType, BigDecimal useMoney) {
        this.userId = userId;
        this.orderId = orderId;
        this.moneyLogType = moneyLogType;
        this.useMoney = useMoney;
    }
}